import { reactive } from "vue";

// 使用webxSearch参数
export default function useWebxSearch(options: UseWebxSearchOptions){
  return reactive({
    formState: options.formState,
    onSubmit: options.onSubmit,
    onReset: options.onReset
  });
};

export declare interface UseWebxSearchOptions {
  // 表单字段
  formState: Record<string, any>;
  // 查询回调
  onSubmit: () => Promise<void> | void;
  // 重置回调
  onReset: () => Promise<void> | void;
}
